package com.rinlink.jbcodec.transform;

import com.rinlink.jbcodec.exception.TransformException;
import io.netty.buffer.ByteBufUtil;

public class HexStringToBytes implements Transform<byte[]> {

    private String hexStr;

    public HexStringToBytes(String hexStr) {
        this.hexStr = hexStr;
    }

    @Override
    public byte[] transform() throws TransformException {
        return ByteBufUtil.decodeHexDump(hexStr);
    }
}
